home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / repeat.z / repeat
Encoding:
Text File  |  1998-10-30  |  1.9 KB  |  54 lines

  1. REPEAT(3I)                                             Last changed: 2-5-98
  2.  
  3.  
  4. NNAAMMEE
  5.      RREEPPEEAATT - Concatenates several copies of a string
  6.  
  7. SSYYNNOOPPSSIISS
  8.      RREEPPEEAATT (([SSTTRRIINNGG==]_s_t_r_i_n_g,, [NNCCOOPPIIEESS==]_n_c_o_p_i_e_s))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The RREEPPEEAATT intrinsic function concatenates several copies of a string.
  18.      It returns the specified number of concatenated copies of the input
  19.      string as the result.  If the number of copies is zero, the result is
  20.      a string of zero length.
  21.  
  22.      RREEPPEEAATT accepts the following arguments:
  23.  
  24.      _s_t_r_i_n_g    Must be a scalar and of type character.
  25.  
  26.      _n_c_o_p_i_e_s   Must be either 0 or a positive integer.  Must also be a
  27.                scalar.
  28.  
  29.      RREEPPEEAATT is a transformational function.  The name of this intrinsic
  30.      cannot be passed as an argument.
  31.  
  32. RREETTUURRNN VVAALLUUEESS
  33.      The result is a scalar entity of type character with a length of
  34.      _n_c_o_p_i_e_s times the length of _s_t_r_i_n_g.  The value of the result is the
  35.      concatenation of _n_c_o_p_i_e_s of _s_t_r_i_n_g.
  36.  
  37.      If _n_c_o_p_i_e_s is zero, the result is a string of zero length.
  38.  
  39. EEXXAAMMPPLLEESS
  40.      In the following program, a literal with a trailing blank is repeated.
  41.  
  42.           CHARACTER*14 CHVAR
  43.           CHVAR = REPEAT('STRING ',2)
  44.           PRINT '(3A)', '>', CHVAR, '<'
  45.           END
  46.  
  47.      The output of the program is:
  48.  
  49.           >STRING STRING <
  50.  
  51. SSEEEE AALLSSOO
  52.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  53.      printed version of this man page.
  54.